package com.cicigodd.brick.plug.system.role.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cicigodd.brick.plug.common.response.PageResult;
import com.cicigodd.brick.plug.system.role.api.SysRoleMenuServiceApi;
import com.cicigodd.brick.plug.system.role.entity.SysRoleMenu;
import com.cicigodd.brick.plug.system.role.request.SysRoleMenuAddRequest;
import com.cicigodd.brick.plug.system.role.request.SysRoleMenuDeleteRequest;
import com.cicigodd.brick.plug.system.role.request.SysRoleMenuDetailRequest;
import com.cicigodd.brick.plug.system.role.request.SysRoleMenuEditRequest;
import com.cicigodd.brick.plug.system.role.request.SysRoleMenuListRequest;
import com.cicigodd.brick.plug.system.role.response.SysRoleMenuDetailResponse;
import com.cicigodd.brick.plug.system.role.response.SysRoleMenuListResponse;
import java.util.List;

/**
 * 角色菜单关联
 *
 * @author cicigodd
 * @date 2022/12/12 15:52:23
 */
public interface SysRoleMenuService extends IService<SysRoleMenu>, SysRoleMenuServiceApi  {

    /**
     * 添加
     *
     */
    void add(SysRoleMenuAddRequest sysRoleMenuAddRequest);

    /**
     * 删除
     *
     */
    void delete(SysRoleMenuDeleteRequest sysRoleMenuDeleteRequest);

    /**
     * 编辑
     *
     */
    void edit(SysRoleMenuEditRequest sysRoleMenuEditRequest);

    /**
     * 详情
     *
     */
    SysRoleMenuDetailResponse detail(SysRoleMenuDetailRequest sysRoleMenuDetailRequest);

    /**
     * 分页列表
     *
     */
    PageResult<SysRoleMenuListResponse> list(SysRoleMenuListRequest sysRoleMenuListRequest);

    /**
     * 根据角色id删除菜单权限
     * @param roleId
     */
    void deleteByRoleId(Integer roleId);

    /**
     * 根据角色id获取菜单id
     * @param roleId
     * @return
     */
    List<Integer> getMenuIdsByRoleId(Integer roleId);

    /**
     * 根据角色id获取权限标识
     * @param roleIds
     * @return
     */
    List<String> getPermsIdsByRoleIds(List<Integer> roleIds);
}